﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Linq.Expressions;
using Tour.Linq.TourDBML;

namespace JCWeb.Web.UserControl
{
    public partial class LineRanking : WebControl
    {
        public string CssClass { get; set; }

        public int TopN { get; set; }

        public string OrderExpressions { get; set; }

        protected int TotalCount { get; set; }

        protected void Page_Load(object sender, EventArgs e)
        {
            var list = TourContext.TourLine.OrderBy(s => s.SaleSort).Take(TopN);
            

            TotalCount = list.Count();
            this.RankList.DataSource = list;
            this.RankList.DataBind();
        }
    }
}
